;;;-*-Mode: LISP; Package: CCL -*-;;;;;; Fixes an MCL flaw that may cause endless loops after calling stream-clear-output on buffered streams.;;;;;; Terje Norderhaug <terje@in-progress.com> ;;;;;; This software is made available AS IS, and no warranty is made about the software or its performance. (in-package :ccl)(defer-patch T :module "IO-BUFFER")(defmethod stream-clear-output ((stream buffered-output-stream-mixin))  ;; was  buffered-character-...  (using-stream-io-buffer (io-buffer stream :speedy t)    (let ((outsize (io-buffer-outsize io-buffer)))      (decf (io-buffer-bytes-written io-buffer) (io-buffer-outpos io-buffer))      (setf (io-buffer-outcount io-buffer)            (or outsize (io-buffer-outbuf-size io-buffer) #+ignore 0)))    (%setf-macptr (io-buffer-outptr io-buffer) (io-buffer-outbuf io-buffer))))